cmake_minimum_required (VERSION 2.6)
project ("Mariano-Distribuidos")

set(SRC_DIR ../)
set(OUT_DIR "out/")
set(CMAKE_BUILD_TYPE Debug)

set(SRC_DIR_MARIANO ${SRC_DIR}mariano/)

include_directories("${SRC_DIR_MARIANO}")
include_directories("${SRC_DIR_MARIANO}comun")
include_directories("${SRC_DIR_MARIANO}api")
include_directories("${SRC_DIR_MARIANO}middleware/controladores")
include_directories("${SRC_DIR_MARIANO}comun/objetosComunes")
include_directories("${SRC_DIR_MARIANO}objetosCompartidos")

include_directories("${SRC_DIR}IPC")
include_directories("${SRC_DIR}common")
include_directories("${SRC_DIR}middleware")


AUX_SOURCE_DIRECTORY ("${SRC_DIR_MARIANO}comun"                    COMMON_SRC)
AUX_SOURCE_DIRECTORY ("${SRC_DIR_MARIANO}api"                      COMMON_SRC)
AUX_SOURCE_DIRECTORY ("${SRC_DIR_MARIANO}middleware/controladores" COMMON_SRC)
AUX_SOURCE_DIRECTORY ("${SRC_DIR_MARIANO}comun/objetosComunes"     COMMON_SRC)
AUX_SOURCE_DIRECTORY ("${SRC_DIR_MARIANO}objetosCompartidos"       COMMON_SRC)

AUX_SOURCE_DIRECTORY ("${SRC_DIR}IPC"    COMMON_SRC)
AUX_SOURCE_DIRECTORY ("${SRC_DIR}common" COMMON_SRC)

file(MAKE_DIRECTORY ${OUT_DIR})

add_executable(${OUT_DIR}launcher    ${SRC_DIR_MARIANO}aplicacion/launcher.cpp        ${COMMON_SRC} ${SRC_DIR}middleware)
add_executable(${OUT_DIR}controlR11A ${SRC_DIR_MARIANO}aplicacion/controlRobot11A.cpp ${COMMON_SRC} ${SRC_DIR}middleware)
add_executable(${OUT_DIR}controlR11B ${SRC_DIR_MARIANO}aplicacion/controlRobot11B.cpp ${COMMON_SRC} ${SRC_DIR}middleware)
add_executable(${OUT_DIR}controlR14  ${SRC_DIR_MARIANO}aplicacion/controlRobot14.cpp  ${COMMON_SRC} ${SRC_DIR}middleware)
add_executable(${OUT_DIR}controlR16  ${SRC_DIR_MARIANO}aplicacion/controlRobot16.cpp  ${COMMON_SRC} ${SRC_DIR}middleware)
add_executable(${OUT_DIR}terminator  ${SRC_DIR_MARIANO}aplicacion/terminator.cpp      ${COMMON_SRC} ${SRC_DIR}middleware)